/*
 * @Author: wuchao66_Git 2803670835@qq.com
 * @Date: 2023-11-02 12:01:33
 * @LastEditors: wuchao66_Git 2803670835@qq.com
 * @LastEditTime: 2023-11-08 15:27:16
 * @FilePath: \t161xgvue\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    redirect:'/load'
  },
  {
    path: '/load',
    name: 'load',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('../views/load/index.vue')
  },
  {
    path: '/main',
    name: 'main',
    component: () => import('../views/main/index.vue'),
    children:[
      {
      path: '/p1',
      name: 'p1',
      component: () => import('../views/main/p1.vue')
      },
      {
        path: '/users',
        name: 'users',
        component: () => import('../views/user/index.vue')
        },///departments
        {
          path: '/departments',
          name: 'departments',
          component: () => import('../views/depart/depart.vue')
          }
    ]

  }
]

const router = new VueRouter({
  routes
})

export default router
